
const data_config = require("./data_config");


module.exports = {
    nav_name: '节点管理',              //生成导航菜单
    module_name: 'node_m',      //生成路径，必须与文件名相同
    //接口
    api: `{
      page: cPath + "/admin/userInfo/page",  //用户分页 节点p=1 节点列表，
      node_detail: cPath + "/admin/userInfo/detail", //节点详情
      set_node: cPath + "/admin/userInfo/setNode", //设置节点

      cancel_node: cPath + "/admin/userInfo/cancelNode", //取消节点
  }`,

    //节点列表
    table1: {
        // isGenerate: "false",                    //false表示不生成页面
        table_name: "node_m_table",         //表页面名
        nav_name: "节点列表",                      //导航名
        tipsText: "节点管理 >> 节点列表",          //顶部文字
        //tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
        //pageApi: "API.node_m.page",  //请求api
        extraPageRequestParams: `
            nodeState: 1,  //是否是节点 0 否 1 是
        `, //已有page和pageSize
        //配置列表页面
        tableData: [
            //类型normal(title定义名称  name定义动态绑定值  type定义类型  itemWidth定义宽度)
            { title: '排行', name: 'index', type: "normal", },
            { title: '用户昵称', name: 'nickName', type: "normal", },
            { title: '手机号', name: 'phone', type: "normal", },
            { title: '会员级别', name: 'grade', type: "normal", },
            { title: '创客级别', name: 'guestName', type: "normal", },
            {
                title: '状态',
                name: 'state',
                type: "opts",
                showName: "stateShow",
                showObj: `{
                  "0": "停用",
                  "1": "使用中",
                }`
            },
            { title: '推荐人手机号', name: 'recommendPhone', type: "normal", },
            { title: '创建时间', name: 'createDate', type: "normal", },
        ],
        //配置列表操作项(type类型  text名称  request是否请求  jump跳转路由【本文件名+跳转文件名】 url接口 requestType请求方式)
        tableOpt: [
            //查看跳转
            {
                type: "modify",
                text: "查看",
                request: false,
                jump: "/node_m_user_detail"
            },
            {
              type: "changeState",
              text: "取消节点",
              request: true,
              url: "API.node_m.cancel_node",
              requestType: 'get',
              params: `{id}`, //必须为文本
              methodNameTag: 'Close', //方法衔接拓展名 changeState Black
              // showCondition: `scope.row.state == '1'`,  //展示条件，没有就不传或置为空
            },

        ],
        //配置搜索栏
        search: {
            //筛选
            contentArr: {
                //labelName定义名称  inputName定义动态绑定值
                input1: { labelName: '用户昵称', inputName: 'nickName', labelWidth: '120' },
                input2: { labelName: '手机号', inputName: 'phone', labelWidth: '120' },
                //selectOptsName自定义名称  selectOptsArr下拉内容  labelWidth定义宽度
                select1: {
                    labelWidth: "120",
                    labelName: '级别',
                    inputName: 'readeIntegral',
                    selectOptsName: "gradeOpts",
                    selectOptsArr: `[
                  { value: "1", label: "普粉" },
                  { value: "2", label: "铁粉" },
                  { value: "3", label: "超粉" },
                  { value: "4", label: "V1" },
                  { value: "5", label: "V2" },
                  { value: "6", label: "V3" },
                  { value: "7", label: "V4" },
                  { value: "8", label: "V5" },
                  { value: "9", label: "V6" },
                  { value: "10", label: "V7" },
                  { value: "", label: "全部" },
                ],
                `,
                },

            },
            //查找按钮的文字
            searchBtn: {
                //链接与table请求接口相同，不做另外配置
                text: "查询",
                extraParams: `
                  nodeState: 1,  //是否是节点 0 否 1 是
                `
            },
            //添加按钮
            addBtn: {
                //(type类型  text名称  request是否请求  jump跳转路由【本文件名+跳转文件名】)
                type: "add",
                text: "新增",
                request: false,
                jump: "/node_m_add_node_table",
            }

        },
    },


     //用户信息详情
  detail_page1: {
    // isGenerate: "false", //false表示不生成页面
    detail_page_name: "user_detail",
    detail_api: "API.node_m.node_detail",
    request_params: `{
        id: id,
      }`,
    tipsText: "会员管理 >> 用户信息详情",
    formData: {
      // titleText: "请填写管理员相关信息",
      item1_1: {
        labelName: "用户昵称",
        inputName: 'nickName',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_2: {
        labelName: "认证所在地",
        inputName: 'addr',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_3: {
        labelName: "域",
        inputName: 'domain',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_4: {
        labelName: "会员等级名称",
        inputName: 'grade',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_5: {
        labelName: "创客名称",
        inputName: 'guestName',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
       item2_1: {
        labelName: '头像图片地址',
        inputName: 'headUrl',
        type: "img",
      },

      item1_6: {
        labelName: "邀请id",
        inputName: 'myInviterId',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      
      item1_7: {
        labelName: "我的推荐码",
        inputName: 'myRecommendCode',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      
      item1_8: {
        labelName: "我的推荐码",
        inputName: 'myRecommendCode',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },

      item1_9: {
        labelName: "直推人id",
        inputName: 'mySuperior',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_10: {
        labelName: "手机号",
        inputName: 'phone',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      
      item2_2: {
        labelName: '分享二维码',
        inputName: 'qrcode',
        type: "img",
      },
      item1_11: {
        labelName: "推荐人电话",
        inputName: 'recommendPhone',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      item1_12: {
        labelName: "更新时间",
        inputName: 'updateDate',
        type: "normal",
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
      //选项展示
      item2_3: {
        labelName: '使用状态',
        inputName: 'state',
        type: "opts",
        optShowName: "stateShow",
        optShowStr: `{
          0: "停用",
          1: "使用",
        }`,
        frontTips: "", //后面的说明
        behindTips: "", //前面的说明
      },
       
    },
  },




    //新增节点选择列表
    table2: {
        isGenerate: "false",                    //false表示不生成页面
        table_name: "add_node_table",         //表页面名
        nav_name: "新增节点列表",                      //导航名
        tipsText: "节点管理 >> 新增节点列表",          //顶部文字
        //tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
        //pageApi: "API.node_m.page",  //请求api
        // extraPageRequestParams: `
        //   courseId: this.$route.query.id,  //请求
        // `, //已有page和pageSize
        //配置列表页面
        tableData: [
            //类型normal(title定义名称  name定义动态绑定值  type定义类型  itemWidth定义宽度)
            { title: '序号', name: 'index', type: "normal", },
            { title: '用户昵称', name: 'nickName', type: "normal", },
            { title: '手机号', name: 'phone', type: "normal", },
            { title: '会员级别', name: 'grade', type: "normal", },
            { title: '创客级别', name: 'guestName', type: "normal", },
            { title: '最近登录时间', name: 'createDate', type: "normal", },

        ],
        //配置列表操作项(type类型  text名称  request是否请求  jump跳转路由【本文件名+跳转文件名】 url接口 requestType请求方式)
        tableOpt: [
            // //查看跳转
            // {
            //     type: "modify",
            //     text: "查看",
            //     request: false,
            //     jump: "/node_m_detail_node"
            // },
        ],

        //配置搜索栏
        search: {
            //筛选
            contentArr: {
                //labelName定义名称  inputName定义动态绑定值  
                input1: { labelName: '手机号', inputName: 'phone', labelWidth: '120' },
                input2: { labelName: '用户昵称', inputName: 'nickName', labelWidth: '120' },

                //selectOptsName自定义名称  selectOptsArr下拉内容  labelWidth定义宽度
                select1: {
                    labelWidth: "120",
                    labelName: '级别',
                    inputName: 'readeIntegral',
                    selectOptsName: "gradeOpts",
                    selectOptsArr: `[
                  { value: "1", label: "普粉" },
                  { value: "2", label: "铁粉" },
                  { value: "3", label: "超粉" },
                  { value: "4", label: "V1" },
                  { value: "5", label: "V2" },
                  { value: "6", label: "V3" },
                  { value: "7", label: "V4" },
                  { value: "8", label: "V5" },
                  { value: "9", label: "V6" },
                  { value: "10", label: "V7" },
                  { value: "", label: "全部" },
                ],
                `,
                },

            },
            //查找按钮的文字
            searchBtn: {
                //链接与table请求接口相同，不做另外配置
                text: "查询",
            },
            //添加按钮
            // addBtn: {
            //     //(type类型  text名称  request是否请求  jump跳转路由【本文件名+跳转文件名】)
            //     type: "add",
            //     text: "新增",
            //     request: false,
            //     jump: "/node_m_add_node",
            // }

        },
    },





}

